package com.sdksoft.readcard.service

import java.io.Serializable

data class BaseRespond<T>(
    val code: Int,
    var msg: String = "",
    var data: T? = null
) : Serializable {
    fun isSuccess(): Boolean = code == BaseCode.CODE_SUCCESS
}

class BaseCode : Serializable {
    companion object {
        const val CODE_SUCCESS = 200 // 请求响应成功
        const val CODE_FAIL = 1001 // 失败
    }
}